<?php


use Illuminate\Support\Facades\Route;

Route::namespace('admin')->group(function (){
    //需要登录并且进行鉴权
    Route::prefix('admin')->middleware('checkAdminLoginAndCheAuth')->group(function (){
        Route::any('/','HomeController@index')->name('admin.main');



        Route::get('/vips','VipSettingsController@vips')->name('admin.vip.vips');
        Route::any('/add_vips','VipSettingsController@add_vip')->name('admin.vip.add_vip');
        Route::any('/edit_vips','VipSettingsController@edit_vip')->name('admin.vip.edit_vip');
        Route::get('/del_vips','VipSettingsController@del_vip')->name('admin.vip.del_vip');




        Route::get('/users','UsersController@users')->name('admin.users.user');
        Route::any('/update_spread','UsersController@update_spread')->name('admin.user.update_spread');

        Route::get('/get_images','ImagesController@index')->name('admin.setting.images');
        Route::any('/add_images','ImagesController@add')->name('admin.images.add');
        Route::any('/edit_images','ImagesController@edit')->name('admin.images.edit');




        Route::get('/get_xiangmus','ProjectController@projects')->name('admin.xiangmu.lists');
        Route::any('/add_xiangmu','ProjectController@add_project')->name('admin.xiangmu.add_project');
        Route::any('/edit_xiangmus','ProjectController@edit_project')->name('admin.xiangmu.edit_project');



        Route::any('/lists_shop','ShopsController@lists')->name('admin.shop.lists');
        Route::any('/add_shop','ShopsController@add')->name('admin.shop.add');
        Route::any('/edit_shop','ShopsController@edit')->name('admin.shop.edit');
        Route::any('/laike_shop','ShopsController@laike')->name('admin.shop.laike');



        Route::any('/change_yong','UsersController@change_yong')->name('admin.users.change_yong');
        Route::any('/update_vip_level_index','UsersController@update_vip_level_index')->name('admin.users.update_vip_level_index');



        Route::get('/get_category','CategoryController@lists')->name('admin.category.lists');
        Route::any('/add_category','CategoryController@add')->name('admin.category.add');
        Route::any('/update_category','CategoryController@update')->name('admin.category.update');




        Route::get('/get_tasks','TaskController@lists')->name('admin.task.lists');
        Route::any('/edit_tasks','TaskController@edit')->name('admin.task.edit');
        Route::any('/add_tasks','TaskController@add')->name('admin.task.add');



        Route::get('/get_bills','BillController@lists')->name('admin.bills.bills');
        Route::any('/audit_bill','BillController@audit')->name('admin.bill.audit');
        Route::any('/del_project','ProjectController@del_project')->name('admin.projects.del_project');




        Route::any('/get_project_pass_list','ProjectPassController@lists')->name('admin.project_pass.lists');
        Route::any('/del_project_pass_value','ProjectPassController@del_pass')->name('admin.project_pass.del_pass');

        Route::any('/get_user_phone_log','UsersController@get_user_phone_log')->name('admin.user.user_phone_log');
        Route::any('/audit_user_phone_log','UsersController@audit_user_phone_log')->name('admin.user.audit_user_phone_log');
    });




    //不需要登录的后台接口
    Route::prefix('admin')->group(function (){
        Route::any('login','LoginController@login')->name('admin.login');//后台用户登录
        Route::any('file_up','HomeController@file_up')->name('admin.file_up');
    });
});
